<div id="side_nav">
                <div class="sideNavCategories">
                    <h1><?php  echo $category_name; ?></h1>
                    <ul class="category departments">
                        <?php 
                        $alt_kategoriler = $this->db->where('category_id',$category_id)->get('subcategories')->result();
                        
                        foreach($alt_kategoriler as $alt_kategori):
                        ?>
                        
                        <li><?php
                        $sname = str_replace(' ', '-', $alt_kategori->name);
                        $sname = mb_strtolower($sname,'UTF-8');
                        
                     
                          $cname = str_replace(' ', '-', $category_name);
                          $cname = mb_strtolower($cname,'UTF-8');
                        echo anchor('urunler/'.$cname.'/'.$sname,$alt_kategori->name); ?></li>
                        <?php endforeach; ?>
                    </ul>
                    
                    
                </div>
            </div>
            
            
            
            <div id="main_content">
                <div class="category_banner"> <img src="images/promo_cat_banner.jpg"> </div>
                <ul class="breadcrumb">
                       <li><?php echo anchor('main','Anasayfa'); ?></li>
                    <li><?php echo anchor('urunler/'.$this->uri->segment(2),$category_name);?></li>
                    <li><?php echo anchor('urunler/'.$this->uri->segment(2).'/'.$this->uri->segment(3),$subcategory_name); ?></li>
                    <li class="active"><?php echo anchor(current_url(),$brand_name); ?></li>
                </ul>
                <!--Toolbar-->
                
                <div class="toolbar">
                    <table>
             
                 <tr>
                 
                 <td>
          
                 <?php if ($this->session->userdata('sort_by') == "name") ?>
                        
                         <?php echo anchor(base_url()."arama/order/name/" .
					(($this->session->userdata('sort_order') == 'asc' && $this->session->userdata('sort_by') == "name") ? 'desc' : 'asc'),'İsme') ; ?>
                 </td><td>
                  <?php if ($this->session->userdata('sort_by') == "model") ?>
                        
                         <?php echo anchor(base_url()."arama/order/model/" .
					(($this->session->userdata('sort_order') == 'asc' && $this->session->userdata('sort_by') == "model") ? 'desc' : 'asc'),'Model') ; ?>
                 
                 </td><td>
                 <?php if ($this->session->userdata('sort_by') == "standart_price") ?>
                        
                         <?php echo anchor(base_url()."arama/order/standart_price/" .
					(($this->session->userdata('sort_order') == 'asc' && $this->session->userdata('sort_by') == "standart_price") ? 'desc' : 'asc'),'Fiyat') ; ?>
                 
                 </td><td>
                    <?php if ($this->session->userdata('sort_by') == "dateadd") ?>
                        
                         <?php echo anchor(base_url()."arama/order/stars/" .
					(($this->session->userdata('sort_order') == 'asc' && $this->session->userdata('sort_by') == "dateadd") ? 'desc' : 'asc'),'Yıldız') ; ?>
                 
                 </td>
                 </form>
                 </tr>
                 
                 </table>
                </div>
                <!--Toolbar-->
                
                
                <!--Product List Starts-->
                <div class="products_list products_slider">
                    <ul>
                    <?php foreach($products as $product): ?>
                        <li> <a class="product_image"><img src="images/pr_l_1.jpg"></a>
                            <div class="product_info">
                                <h3><?php echo anchor('urun/'.$product->name.'/'.$product->product_id,$product->name); ?></h3>
                                <small>Comfortable and fun to wear these clogs are the latest trend in fash</small> </div>
                            <div class="price_info"> <a href="#">+ Add to wishlist</a>
                              <a href="<?php echo base_url().'urun/'.$product->name.'/'.$product->product_id;?>"> <button  class="price_add" title="" type="button" > <span class="pr_price"><?php echo number_format( $product->standart_price, 0, '', '.')." TL";?></span><span class="pr_add">Add to Cart</button></span></a>
                            </div>
                        </li>
                        <?php endforeach; ?>
                        
                    </ul>
                </div>
              
                <!--Product List Ends-->
                <!--Toolbar-->
                <div class="toolbar">
                    <div class="pagination" style="width: 600px; margin-left:5px;">
                <?php echo $pagination; ?>
                </div>
                </div>
                <!--Toolbar-->
            </div>            
